<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例2</title>
</head>
<body>
    <ul>
        <li id="sina">新浪微博</li>
        <li>官方微信</li>
        <li>联系我们</li>
        <li>公益基金会</li>
    </ul>
    <script>
        const liNode = document.getElementById("sina");
        console.log(liNode.nodeType,liNode.nodeName,liNode.nodeValue,liNode.innerText)
        //文本节点
        const textNode = liNode.firstChild
        console.log(textNode.nodeType,textNode.nodeName,textNode.nodeValue)
    </script>
</body>
</html>